 <template>
  <el-config-provider :locale="lang">
      <router-view></router-view>
  </el-config-provider>
</template>

<style lang="scss">

</style>

<script setup>
import { watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useConfig } from './store/config'
import { setTitleFromRoute } from './utils/common'
import { useRoute } from 'vue-router'
const config = useConfig()
const { getLocaleMessage } = useI18n()
const lang = getLocaleMessage(config.lang.defaultLang)
const route = useRoute()
watch(
    () => route.path,
    () => {
        setTitleFromRoute()
    }
)
</script>
